package cn.myschool.printer;

/**
 * @author oldliu
 * @since 1.0
 */
public class Printer {
    private String brand;//品牌
    private int price;//价格
    private Ink ink;
    private TextPaper paper;

    public  Printer(){

    }

    public Printer(String brand, int price) {
        this.brand = brand;
        this.price = price;
    }

    //打印
    public void print(String s){
        System.out.println("当前"+brand+"打印机价格是"+this.price+"开始打印");
        System.out.println("使用"+ink.getColor());
        paper.print(s);
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public void setInk(Ink ink) {
        System.out.println("加上了墨水");
        this.ink = ink;
    }

    public void setPaper(TextPaper paper) {
        System.out.println("加上了纸张");
        this.paper = paper;
    }
}
